﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BSCMFF.Core.DataAccessLayer;

namespace BSCMFF.Web.UserControls.Evaluation
{
    public partial class FillPKPIDetail : System.Web.UI.UserControl
    {
        private Personal_KPI _pkpi;

        public Personal_KPI PKPI
        {
            get
            {
                if (_pkpi == null)
                {
                    _pkpi = new Personal_KPI();
                    //int tempID = 0;
                    //Int32.TryParse(HiddenFieldID.Value, out tempID);
                    //_pkpi.ID = tempID;
                    _pkpi.Name = RadTextBoxName.Text;
                    _pkpi.Description = RadTextBoxDescription.Text;
                    
                    return _pkpi;
                }
                else
                {
                    return _pkpi;
                }

            }
            set
            {
                _pkpi = value;
            }
        }

        public int KPI_ID
        {
            get
            {
                return Int32.Parse(HiddenKPI_ID.Value);
            }
        }

        public String Name
        {
            get
            {
                return RadTextBoxName.Text;
            }
        }

        public String Description
        {
            get
            {
                return RadTextBoxDescription.Text;
            }
        }

        public String Measure
        {
            get
            {
                return RadTextBoxMeasure.Text;
            }
        }

        //public String VerbalEvaluation
        //{
        //    get
        //    {
        //        return RadTextBoxVerbalEvaluation.Text;
        //    }
        //}

        public int Weight
        {
            get
            {
                return (int)RadNumericTextBoxWeight.Value;
            }
        }

        public int? StartValue
        {
            get
            {
                return (int?)RadNumericTextBoxStartValue.Value;
            }
        }

        public int? TargetValue
        {
            get
            {
                return (int?)RadNumericTextBoxTargetValue.Value;
            }
        }

        //public int? CurrentValue
        //{
        //    get
        //    {
        //        return (int?)RadNumericTextBoxCurrentValue.Value;
        //    }
        //}

        protected void Page_Load(object sender, EventArgs e)
        {
            //this.DataBind()
        }
    }
}